package com.lswms.modules.lswms.service.impl.base;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lswms.common.service.impl.CrudServiceImpl;
import com.lswms.modules.lswms.dao.base.AllocationstrategyDao;
import com.lswms.modules.lswms.dto.base.AllocationstrategyDTO;
import com.lswms.modules.lswms.entity.base.AllocationstrategyEntity;
import com.lswms.modules.lswms.service.base.AllocationstrategyService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 分配策略
 *
 * @author DX sunlightcs@gmail.com
 * @since 1.0.0 2021-06-26
 */
@Service
public class AllocationstrategyServiceImpl extends CrudServiceImpl<AllocationstrategyDao, AllocationstrategyEntity, AllocationstrategyDTO> implements AllocationstrategyService {

    @Override
    public QueryWrapper<AllocationstrategyEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<AllocationstrategyEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotBlank(id), "id", id);

        return wrapper;
    }


}